<h1>Editing movie</h1>

<% form_for(@movie) do |f| %>
  <%= f.error_messages %>

  <p>
    <%= f.label :title %><br />
    <%= f.text_field :title %>
  </p>
  <p>
    <%= f.label :description %><br />
    <%= f.text_area :description %>
  </p>
  <p>
    <%= f.label :rating %><br />
    <%= select_tag "movie[rating]", options_for_select(["G", "PG", "PG-13", "R", "NC-17"]) %>
  </p>
  <p>
    <%= f.label :released_on %><br />
    <%= f.date_select :released_on %>
  </p>
  <p>
    <%= f.submit 'Update' %>
  </p>
<% end %>

<%= link_to 'Show', @movie %> |
<%= link_to 'Back', movies_path %>